// import { login } from '@/api/user'

const getDefaultState = () => {
  return {
    vrResult: 'vrResultDefault'
  }
}

const state = getDefaultState()

const mutations = {
  RESET_STATE: (state) => {
    Object.assign(state, getDefaultState())
  },
  SET_RESULT: (state, vrResult) => {
    state.vrResult = vrResult
  }

}

const actions = {
  // user login
  // login({ commit, dispatch }, userInfo) {
  //   return new Promise((resolve, reject) => {
  //     login(userInfo).then(response => {
  //       const { data } = response
  //       commit('SET_USER', data)
  //       commit('SET_TOKEN', data.token)
  //       localStorage.setItem('token', data.token)
  //       resolve()
  //     }).catch(error => {
  //       reject(error)
  //     })
  //   })
  // }

}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

